import { axios } from '@/utils/request'

const prefix = '/settle/settleAccountPayment'

/**
 * 高级查询
 * @param params
 * @returns {AxiosPromise}
 */
export function pageList(params) {
  return axios({
    url: prefix + '/pageList',
    method: 'GET',
    params: {
      ...params
    }
  })
}

/**
 * 新增
 * @param params
 * @returns {AxiosPromise}
 */
export function addObj(params) {
  return axios({
    url: prefix + '/addPayment',
    method: 'POST',
    data: {
      ...params
    }
  })
}

/**
 * 获取详情
 * @param id
 * @returns {AxiosPromise}
 */
export function getObj(id) {
  return axios({
    url: prefix + '/getInfoById/' + id,
    method: 'GET'
  })
}

/**
 * 修改
 * @param params
 * @returns {AxiosPromise}
 */
export function updateObj(params) {
  return axios({
    url: prefix + '/updatePayment',
    method: 'PUT',
    data: {
      ...params
    }
  })
}

/**
 * 删除
 * @param id
 * @returns {AxiosPromise}
 */
export function delObj(id) {
  return axios({
    url: prefix + '/deleteById',
    method: 'DELETE',
    params:{id:id}
  })
}
